home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
006a
/
ca22.zip
/
CA.DOC
next >
Wrap
Text File
|
1992-01-14
|
23KB
|
542 lines
CA 2.2
Resident four function calculator
by
Bob Eyer
[73230,2620]
Jan 14, 1992
┌────────────────────────────────────────────────────────────┐
│ WARNING: THIS SOFTWARE MAY NOT WORK PROPERLY WITH CERTAIN │
│ APPLICATIONS. SEE CAUTION BELOW. │
└────────────────────────────────────────────────────────────┘
** SHAREWARE NOTICE **
This program is shareware: if you think it's a worthy addition to
your personal software, you should register with the author.
Register this one, and you get a disk full of some of the best
utilities in the business FOR FREE!!
The registered version of CA lacks the "Please register!" note on
return of results from the Accumulator. See Accumulator section
below on how to display or paste the result.
Simply make out a money order in the amount of $20 US to Bob
Eyer and send with your return address to:
Bob Eyer
1100 Bloor Street West
Suite 16
Toronto, Canada M6H 1M8
Please mention in your accompanying note whether you wish 5.25" or
3.5" diskette format, and state the name in which you wish
registration-only utilities to be registered. [Certain of the
most important items have never been posted and are distributed
only through the registration.]
Enquiries may be placed by writing directly to the author at
Compuserve userid [73230,2620].
Warranty and Disclaimer:
-----------------------
The author, Bob Eyer, guarantees the physical integrity of the
diskette covering the points above, and will replace free of
charge, if it is received defective. However, in no case will the
author be responsible for any damages due to loss of data or any
other reason. In no event does the author's liability for any
damages exceed the price paid for the buyer's order of this
software, regardless of the form of the claim. The person using
the software bears all risk as to the quality and performance of
the software.
See Program Listing at end of documentation for the primary
benefits of registering.
Help screen
-----------
Syntax: CAF [/U] /U = unload from memory
Hotkey: Rightshift-/
Binary operations: + - * / ^
Accumulator: ADD [Esc to exit]
Modes: x PLACES COLOR y E 0 N D
Review: ST
See the note about Errors below.
INTRODUCTORY NOTE: CA is the 4-function fixed-point alternative to
CAF (see program listing at end of this doc file). CA supports
just four functions (addition, subtraction, multiplication and
division) plus an accumulator for performing many additions. The
advantage of CA is that it uses only about 13K of memory; CAF
requires about 27K. The disadvantage is that it has only
single-precision range and accuracy, and is restricted to the
standard array of arithmetic functions.
The new version of CA adds an Accumulator and introduces a more
sophisticated input routine which has sensitivity to the Esc key
and destructive backspace for window editing purposes.
IMPORTANT: This program does not provide a menu or picture of a
calculator - so as to avoid obscuring portions of the underlying
editing application, and to avoid requiring the user to employ
only 25 x 80 screens (some TSR calculators require this, to make
use of Line 25 for calculator monitoring). CA responds equally
well in 50 x 80 or 44 x 132 video environments; generally, it is
indifferent to the manner in which the video raster is defined.
CA is designed to respond just to the hotkey, which provides
merely a 'calculation window', in which the user enters his
calculations or mode changes. Hitting ENTER after supplying a
calculation or mode change to the window, simply executes the job
and returns to the application. Where a result is generated, it
is pasted directly to the underlying application where the cursor
was last located.
In examples seen below, EACH calculation or mode change is
preceded by invoking the hotkey. This, however, does not apply to
the Accumulator (see below).
CA is also designed to return the cursor to the initial position
in the same window, to permit making mode adjustments without line
skipping. Once a task is completed, you may exit the window
merely by hitting ENTER one additional time or by using the
spacebar to delete the window. The old window always disappears
in an editing environment after the result is injected to the
text, but mode change information will, in general, remain.
Modes/review
------------
CA provides four groups of mode selections - number of decimal
places to which to round results, colour of calculation window,
whether to display results in scientific notation, and whether to
echo the result to display or paste to text.
The current mode situation may be viewed simply by entering ST in
the calculation window (ST is short for 'status').
Mode changes are entered directly in the calculation window and
the new mode specs are resummarised in the calculation window,
just as though ST had been issued.
x PLACES:
Entry of '5 places' in the calculation window will cause CA to
operate so as to round pasted results to five decimal places.
Entry of '0 places' means that no formatting will occur; that is,
results will appear with the maximum precision stuffable into the
keyboard buffer at one pass. The default value for Places is 0.
The maximum number of places is 6.
COLOR y:
Entry of 'COLOR 30' will cause the calculation window to have a
bright yellow foreground and a blue background. For colour
details see below. The default colour scheme is black on white
(112). Color 0 automatically converts to 112, so as to avoid
black on black.
E/0:
Entry of E in the window will cause results to be exhibited using
scientific notation. When E is set, CA will default Places to 6.
When 0 is entered, scientific notation is removed, but places will
remain as before.
N/D:
N means normal, and D means display. N is the default. Normal
mode injects results to the underlying application; display mode
echoes results to the screen without pasting to the application.
CA's variable review
--------------------
Whether in the regular calculation window or in the Accumulator,
the user may retrieve a variable, simply by entering its name.
(See below about CA's "store/recall" facility).
Binary operations
-----------------
CA supports four two-variable ('binary') operations: + - * /, or
add, subtract, multiply, and divide. For example,
1991-1917 [= 74
Entry of numbers using scientific notation is not supported by CA.
Additional examples:
35/34 [= 1.0294117
35*34 [= 1190
Automatic store/recall
----------------------
If you are doing several calculations which involve use of the
same term, you may reduce typing further by using variables.
Calculation window variables are A, B, and C. The first time
you execute a calculation with numbers, the first number is
always stored into A, the second number into B, and the result
into C. These values can be re-used, simply by employing these
variables in subsequent calculations [except, of course, for the
fact that, as each new calculation is done, the value of C will
be updated with the new result].
Example (after entering '3 PLACES' and then 'E' in the window):
Suppose we wish to perform the following calculations -
34.21102 x 435, and
34.21102 / 355.5
Here, each calculation uses the same initial term. We proceed
as follows, each time by hitting Rightshift-slash, and entering
the calculation shown:
34.21102 * 435 [= 1.488e+4
a/355.5 [= 9.623e-2
The second calculation above could be repeated merely by entering
a/b
The user may also proceed to obtain results for the other three
operations, using the same numbers, as follows:
a*b [= 1.216e+4
a+b [= 3.897e+2
a-b [= -3.213e+2
The output C-variable can also be used in calculations. For
example, we may first calculate with no scientific notation
2/3 [= 0.667 ]
Here, A = 2, B = 3, and C is the result in brackets. Now, if we
multiply the result C by 3, we should get back the numerator A:
C * 3 [= 2.000
This example illustrates the fact that CA, like handheld
calculators with the store/recall function, stores results in a
separate register before rounding. It is this separate register
that is used for input, when the user employs C in a
calculation. [otherwise, the user might get back 2.001].
This type of 'result protection' on use of a previous result is
not, however, found in most TSR calculators.
Accumulator
-----------
Entry of the keyword ADD in the calculation window, will transfer
control to a special area of CA, which displays the following type
of prompt:
>
Use your Esc key to exit accumulator and return to the main
window, or paste result to text.
Numbers entered at this prompt are totalled, each total being
echoed in the right half of the display. Hitting the Esc key
finishes the operation, wipes the special window from the screen
(if you're in an editing environment), and injects the result to
the underlying application.
If you have a consecutive series of the same number to add, just
enter the first one, and then A for each of the following ones.
The accumulator always stores the current addend into variable A,
and the result into C. Entering C adds the previous result to
itself.
In unregistered distribution versions, the Accumulator returns the
message "Please register!" in the calculation window. To paste
the result, just hit the hotkey and enter C. Registered users are
spared of this minor inconvenience, as well as the opening
shareware notice.
Prompt Colour
-------------
As stated above, to change the colour of the calculation window,
simply enter
COLOR x
in the window, where x is a COLOR number. The default is 112,
which describes black foreground on a white background. 0 is
impossible (black on black), and so CAF converts that number to
112 automatically. Foreground and Background colours may be
determined by using the following table:
Back Fore Bright Fore
---- ---- -----------
Black 0 0 8
Blue 16 1 9
Green 32 2 10
Cyan 48 3 11
Red 64 4 12
Magenta 80 5 13
Brown 96 6 14
White 112 7 15
The correct COLOR number is found merely by adding the Foreground
number to the Background number desired. For example, Bright
Green on Blue background is 10 + 16 = 26.
Avoid setting COLOR above 127. Values above that limit will
produce blinking displays.
In my estimation the COLORs best for the eye are 10, 11, 14, 15,
26, 27, 30, 31, 74, 75, 78, 79 and 112. But you may have other
ideas. Example,
COLOR 75
sets the window to Bright Cyan on a Red background.
Errors
------
CA supports three error reports -
xyz: illegal - This message occurs where your entered
instruction, 'xyz', is not recognised by
CA.
Zero divide error - Attempt to divide by zero.
E + number - When an operation results in the
internal truncation of a number due
[E]xceeding the capacity of CA's long
integer number system, the paste default
is overridden, and the result displayed
to the window with an E prefix.
CAUTION
-------
Certain types of editors will not work consistently with CA - in
particular, editors which simulate the Macintosh console
environment, such as the Microsoft DOS 5.0 Editor, or Microsoft
Windows. The problem here is not unique to CA, as collateral
testing of other TSR calculators has shown. If you're serious
about computing, don't use graphics user interfaces (GUI's)!
Further, like all memory resident programs, CA is vulnerable to
compatibility problems which may arise from its use with other
TSR's. If you find you must reboot, try removing other memory
resident programs from your AUTOEXEC.BAT file, or try changing the
sequence in which they are loaded until you find the best
combination.
However, tests have shown that CA is much less vulnerable to
interrupt collisions and other compatibility problems than other
TSR calculators.
One category of TSR which is almost guaranteed to cause trouble
for CA (and for any program which stuffs keystrokes into the
keyboard buffer) are programs like 128KEY.COM, which lengthen or
change the effective size of the keyboard buffer. Don't use such
programs with CA.
CA is primarily intended to work with editors and wordprocessors,
and has been tested on Wordperfect 5.0, Galaxy 2.42, Captain
Blackbeard 1.13, SLED 1.1, QEDIT 2.08, pEDIT 2.10, and a number of
other editors/wordprocessors, with no confirmed problem or
abnormality.
CA is recommended for use as the last memory resident program
loaded, so as to permit the use of the /U commandline option to
unload it from memory, and only in standard text-editing or
wordprocessing applications. Unless you have found that CA works
with your non-standard application, it is recommended that you
take the precaution of unloading CA before you invoke such an
application.
DESCRIPTION OF PROGRAMS YOU WILL RECEIVE FREE WITH YOUR REGISTRATION
********************************************************
Many of the programs in the following list have not been publicly
posted, and those which have been posted previously are unlikely
to be posted in new updates, except in rare cases.
Certain programs are registered-only, which means that the user
must not post copies on bulletin boards. Some of these have also
never been posted at all, and are available ONLY to registered
users. All of the non-posted programs are continually being
updated, as they are in constant use by the author. The ones
which have never been been posted are marked by double asterisk.
Versions new since last public post are indicated with a + sign.
Nearly all file-processing programs take full advantage of
wildcard logic, including DOS shortcuts, keeping keystrokes to
absolute minimum.
Total size in compressed form for all of below, including docs:
about 320K.
** MG
--
Moving average ASCII graphing program. Especially designed for
obtaining graphic updates on stock-market activity in practical
trading environments, in which it is essential that the user get a
quick graph immediately, with points of the graph directly
associated with the numerical and other text information which
these points represent (a feat impractical in Lotus graphics).
Designed to be used with SETV below.
+ SPC
---
Multidrive columnar drive report, with fairly complete description
of your machine including communications, important chips,
printer, BIOS, memory, processor and coprocessor speed,
multitasking, networking, and so on, all in one single snapshot.
SETV
----
Sets seven VGA text video modes. Enables Multisync or VGA user to
make use of seven major video text modes at DOS level, including
132 column modes.
AL
--
Best and most flexible TSR alarm program with clock option. Has
time-locking and a full range of options. 7K of memory.
CA
--
Four-function fixed point TSR calculator with formatted displays
and scientific notation for direct paste to text. Also has
accumulator. Four mode groups. About 13K of memory.
+ CAF
---
TSR floating point calculator with formatted displays and direct
paste to text. 18 functions, and an accumulation area. Five
types of modes. Number formatting. CAF is the most sophisticated
calculator in the business, for its size. 27K of memory.
PAUZ
----
Replacement for DOS PAUSE, allows specification of seconds to wait
or target [<=] time, as well as what key to use for pause
interruption. User triggering of error levels 1 to 9.
+ MV
--
Fast file mover. Preserves date/time/attribute stamp for all
moves. Allows moving Read Only and Hidden files, source files
opened in SHAREd mode for network users. Wildcards. None
faster or safer.
** SPLT
----
ASCII file splitter which, for the first time, offers the ability
to prevent the split from resulting in split messages or other
defined text blocks. Works with DIV and REV, below.
** OTL
---
Makes it possible to apply any set of operations, say, as
specified in a batch file, to every file in an ASCII list, without
having to specify the path information for each file. For Sysops.
+ KALL
----
For users of DOS 3.0-3.2 who would like batch file control like
that offered in the more advanced DOS versions. Allows
redirection of batch file output, unlike DOS 4/5 CALL.
** SS
--
Secure shell, protects your system from keyboard redefinition
resulting from ANSI codes read in remote message areas. Maintains
default DOS colour scheme, but requires use of NANSI.SYS.
DIV
---
Generalisation of FGREP-type programs to include blocks of text.
A single string defines a block in most kinds of blockable text.
DIV handles almost any kind. Returns blocks containing one or
more of up to 64 different strings from large ASCII files. Useful
in extracting messages or extended file descriptions containing a
range of strings without manual cut and paste. Can prepare a file
containing every block EXCEPT the ones selection, and
simultaneously. See REV in short list below.
COMB
----
Sorts and combines wildcard text files in specified order into
first file found in that order. Primarily for eliminating the
tedium and error involved in accumulating message files into one
file for easy reference. Essential for systematic followers of
international correspondence forums.
ADD
---
Adds very lengthy columns of numbers found in ASCII text, such as
byte counts in BBS listings without manual data entry. (Capable
of handling the addition of up to 1 billion numbers in one pass).
CITM
----
Counts similar items in formatted ASCII lists, where the
similarity is based on a fixed string field found at one position
in each line of text, and all lines have been previously sorted,
based on the contents of that string field. Perfect as a
companion utility for Baker's QSORT.
+ FVER
----
Compares a file list, like a BBS listing, to the actual files
found anywhere in the BBS's download path. Operates in FAST or
SLOW mode, depending on your safety requirements. Can be operated
remotely through a BBS door.
+ MVA
---
Moves files, even if set to read only status, from anywhere in a
specified download path to a given location. Operates directly on
ASCII lists, like directories or BBS listings. Can be operated
remotely through a BBS door.
RNF
---
Minimises keystrokes and keystroke error on renaming files with
date or time info or special flags.
plus:
----
ELIM - Advanced replacement for DEL.
LCNT - Very fast linecounter; formatted output.
ESRT - Element sorter. User specified delimiter.
+ TYME - Program execution timer.
CHG - Attribute file/directory/date/time file changer/reader.
+ CBRO - Compuserve Browse converter. Old/new formats.
REV - Reverses order of blocks of text (messages, etc).
DTR - Toggles modem DTR line.
RTS - Toggles RTS line.
** ENV - Environment statistics
** CFIX - Fix cursor to normal, block or off.
** EL - Converts number to error level, for batch files.
WD - Gives wildcard support to any program.
SWP - Fast single-level sweep program.
TSTF - Floppy disk status tester.
----------------------
End of documentation